<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Skill extends Model
{
    protected $table = 'skill';
    protected $dateFormat = 'U';

    const UPDATED_AT = 'create_time';
    const CREATED_AT = 'update_time';

    protected $fillable = [
        'user_id', 'skill_detail', 'skill_intro', 'hidden'
    ];

    public function getSkillIntroAttribute() {
        return json_decode($this->attributes['skill_intro']);
    }
}
